import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { InfoVO, InfoForm, InfoQuery } from '@/api/bykt/info/types';
export const addChapterData = (data:any) => {
  return request({
    url: '/bykt/chapter',
    method: 'post',
    data: data || {}
  });
};
export const editChapter = (data:any) => {
  return request({
    url: '/bykt/chapter',
    method: 'put',
    data: data || {}
  });
};
export const delChapterInfo = (ids: string | number | Array<string | number>) => {
  return request({
    url: '/bykt/chapter/' + ids,
    method: 'delete'
  });
};

/**
 * 查询章节信息详细
 * @param id
 */
export const getChapterInfo = (id: string | number): AxiosPromise<InfoVO> => {
  return request({
    url: '/bykt/chapter/' + id,
    method: 'get'
  });
};
